class Match < ActiveRecord::Base
  belongs_to :team_local, :class_name => "Team"
  belongs_to :team_visitor, :class_name => "Team"
  
  named_scope :all_by_serie, :order => "serie, start", :include => [:team_local, :team_visitor]
  named_scope :all_from_serie, lambda{ |serie| {:conditions => { :serie => serie } , :order => "start, serie" } }
  
  has_many :bets
  
end
